package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 入出库原因码实体类
 * <p>
 * @author 吴旭
 */
public class StockReasonEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -8003765553109933074L;
    private Long ReasonId;
    private String ReasonCode;
    private String ReasonName;
    private Integer InOutFlag;
    private String Description;

    public Long getReasonId() {
        return ReasonId;
    }

    public String getReasonCode() {
        return ReasonCode;
    }

    public String getReasonName() {
        return ReasonName;
    }

    public Integer getInOutFlag() {
        return InOutFlag;
    }

    public String getDescription() {
        return Description;
    }

    public void setReasonId(Long ReasonId) {
        this.ReasonId = ReasonId;
    }

    public void setReasonCode(String ReasonCode) {
        this.ReasonCode = ReasonCode;
    }

    public void setReasonName(String ReasonName) {
        this.ReasonName = ReasonName;
    }

    public void setInOutFlag(Integer InOutFlag) {
        this.InOutFlag = InOutFlag;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof StockReasonEntity)) {
            return false;
        }

        final StockReasonEntity that = (StockReasonEntity) o;

        return new EqualsBuilder()
                .append(this.getReasonId(), that.getReasonId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getReasonId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
